import Vue from 'vue'
import Vuex from 'vuex'
import createPersistedState from "vuex-persistedstate"
// import {setItem, getItem} from '../utils/storage'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    basicId: '', // 基本信息的id
    videoId: '', // 视频Id
    textContent: '', // 富文本内容
  },
  mutations: {
    // 基本信息Id
    getMsg(state, param) {
      state.basicId = param
    },
    //获取视频id
    getVideoId(state, param) {
      state.videoId = param
    },
    getTextContent(state, param) {
      state.textContent = param
    },
  },
  actions: {
  },
  modules: {
  },
  plugins: [createPersistedState()],
})
